package com.smt.ejb3.tutoria.client;

import javax.naming.InitialContext;
import javax.naming.NamingException;

import com.smt.ejb3.tutoria.callback.listenerclass.Banana;
import com.smt.ejb3.tutoria.callback.listenerclass.BananaManager;

public class BananaClient {
	public static void main(String[] args) {
		
		try {
			InitialContext ctx = new InitialContext();

			BananaManager service = (BananaManager) ctx
					.lookup("BananaManagerBean/remote");
			
			Banana b = new Banana();
			b.setName("good banana");
			service.saveApple(b);

		} catch (NamingException ex) {
			ex.printStackTrace();
		}
	}
}
